CONCACHE COPYRIGHT horio shoichi 1995 CONCACHE NAME concache.exe - DOS concurrent disk cache SYNOPSIS concache [ mem-arg ] [ dev-arg ] [ option ] [ flags ] device=concache.exe [ mem-arg ] [ dev-arg ] [ option ] [ flags ] COMMAND LINE RULES Command line has following rules - Operands consist of arguments, options, flags, and ter- minating ';' (semicolon). Except for ';' , the order is unimportant. - The character ';' (semicolon) terminates command line. This and the operands after the character are ignored. - All operands are case sensitive, and generally must be in lower case. For lines in config.sys, operands are converted to lower case. - Alphabetic part of an option can be abbreviated down to one or two characters. For example the delete option has the syntax d[e[l[e[t[e]]]]]]. - The character '/' can be placed anywhere ' ' (the white space) can be placed. - Where drives are written, the character ':' (colon) can be written, if adjacent to drive letter, as many as wanted. For example, in concache.exe command line, "sfg" is equivalent to "s:f:g:", "s::f::::g::::::::::", and so on. DESCRIPTION The concache.exe is the disk cache program for DOS environ- ments. The other programs ccdisk.exe and floppies.exe works under the control of this program. It is possible to load concache.exe into UMB (upper memory block) by appropriate load command, such as devicehigh= instead of device= or using loadhigh command. Also, it loads its resident part into UMB with its "load_umb" option. This can be convenient since this method is not affected by initial concache.exe program size. After loaded as a character device driver or as a TSR (Ter- minate and Stay Resident) program, Concache.exe can change most of parameters from command.com command line. Concache 1.00 Last Update: 18 March 1995 1 CONCACHE COPYRIGHT horio shoichi 1995 CONCACHE If used without any operand, concache.exe lists the flags in effect, state of memory, and state of disks in use. concache.exe gets this information from resident concache.exe program. Memory Arguments This argument must be present for concache.exe to go resident. The named memories are examined and if enough memories are available to satisfy the argument then they are used for cache data area. Memory argument takes following forms x[size] Allocate/redefine extended memory according to EMB (Extended Memory Block) 2.0. e[size] Allocate/redefine expanded memory according to EMS (Expanded Memory Specification) 4.0, Concache.exe does not use page frames. p[size] Allocate raw protected memory, retrievable via BIOS int15. where size is the size to start or to continue concache.exe. If size is not given, concache.exe uses all of available memory of the type. Int15 memory is not allowed to change its size after once concache.exe is loaded. Changing its size is only possible by unloading and reloading concache.exe. Extended and expanded memory can be changed at any time after concache.exe is loaded. However, this must not be exercised frequently, since this causes voiding accumulated cached data in memory. Size are written in decimal or "0x" preceded hexadecimal value optionally followed by no space intervening m, mb, k, kb, or b for megabytes, kilobytes, or bytes, respectively. (A trailing b is for "bytes". If the hexadecimal is fol- lowed by 'b' then it is interpreted as part of value but not to mean "bytes".) The size is truncated to nearest multiple of 64 kb. If total usable memory is less than 128 kb, cach- ing is not done. The total maximum value concache.exe handles is 64 mb. Device Arguments Drive arguments define cache refreshment policy for each Concache 1.00 Last Update: 18 March 1995 2 CONCACHE COPYRIGHT horio shoichi 1995 CONCACHE drive. They take the forms c[drives] (default) to refresh cache using concurrent method, that is, concache.exe refreshes unwritten cache back to drives concurrently with user programs and DOS, and possibly with the other devices. This is default. a[drives] to refresh cache not using concurrent method but using write after, w[drives] to refresh cache with "write through" method. This is the safest traditional disk cache method, s[drives] not to cache the data for the drives. Drives are written after each c, a, w, s letter with no spaces and tabs. Range expressions are allowed. For exam- ple, wja-df-h is equivalent to wabcdfghj to mean drives a:, b:, c:, d:, f:, g:, h:, j: are to be cached with write through method but drives e:, i:, and those above j: are not. It makes no sense to specify different refreshment policies for drives on the same devices. In these cases concache.exe uses the most pessimistic policy for the device. Note actu- ally this happens only between concurrent and write after methods. If no drives are specified after any of c, a, w, s letter, then it means "all the other" drives. For example aabc w specifies drives a:, b:, c: are cached with write after method but all the other drives are write through. With similar syntax, r[drives] means refresh unwritten cache data back. The command awaits the completion of the writes. f[drives] means discard all data for the drive unconditionally, written back or not. In practice, flush is seldom used. If, for example, floppy change line does not work, then cached data for the device may have to be flushed manually. j[drives] Concache 1.00 Last Update: 18 March 1995 3 CONCACHE COPYRIGHT horio shoichi 1995 CONCACHE tells not to write deleted data sectors from cache memory. This is time consuming, since every write to a fat sector has to be examined if every unallocated (zero) sector on the fat still remains to be written from cache data area to disk. This argument is useful for slow drives if files on them must be frequently updated. The r[drives] and f[drives] are only meaningful after concache.exe is loaded. Options. unknown_drives_allowed This option tells concache.exe that drives unknown to it must be treated just like hard disks. In the case such as two drives are unknown but only one of them is to be handled as a hard disk, unnecessary one must be marked with s drive argument. Drives known to concache.exe are those described as hard disks or flop- pies by DOS drive parameter. delete The delete option is the option to tell resident (loaded as TSR) concache.exe to be unloaded from memory. It ignores all the other operands. This option tries to refresh unwritten data before it attempts to delete the resident code and data. If delete is unsuccessful for any reason, then concache.exe stays in memory with stop mode. gang_interrupts This option is seldom necessary. It tells concache.exe that programs other than multitaskers and concache.exe need BIOS multitasking interrupts. buffer_size=nbytes The option specifies the buffer size to be used for cache io, which defaults to the size of largest block disks. It can be any multiple of this default. directory_spaces=number-of-entries The option specifies the number of entries of concache.exe internal directory for cache data area. The number is, if unspecified, initialized to that of devices which can be run concurrently. Specifying the Concache 1.00 Last Update: 18 March 1995 4 CONCACHE COPYRIGHT horio shoichi 1995 CONCACHE value smaller than default limits the concurrency. On the other hand, since the access to the area is typ- ically in a large cycle, performance improvement by this option is only possible with a large value. (May have to be a half or third of cache data area divided by 64kb). h[{c|d|h|m|w}...] The option controls status display from concache.exe, where 'c' displays the values of options in effect. The 'd' drive status, the 'h', together with 'd', clears drive statistics, the 'm' displays state of cache data area, and the 'w' displays concache.exe overall condi- tions. Most of flags are seen with this. The 'c', 'd', 'm', 'w', and 'h' can be combined (with no intervening space) into one operand. If 'h' alone is given then concache.exe behaves as if hcdmw is given. iobuffers=number-of-entries This option specifies the number of disk and floppy io buffers. The default is the number of concurrencies. Increasing this value improves performance. Since data for each drive is managed in chunks of 8kb in cache data area, the limit of the improvement by increasing the number of buffers is 16 times the number of devices to work concurrently. Note: Since current implementation is done in tiny memory model, and io buffers are allocated in its pro- gram space, the resident size with total buffer space may not exceed 64kb. This condition places the limits of buffer space to somewhere below 40kb. load_umb This option specifies the resident part of concache.exe be loaded into UMB if possible. stackspace=nbytes specifies size of stack space for each device used by concache.exe internally. tick_delay=number-of-55ms-ticks This option specifies the delay in 55 ms ticks after any DOS disk access to begin writing back to devices. The value can be up to 254 (about 14 seconds). Default Concache 1.00 Last Update: 18 March 1995 5 CONCACHE COPYRIGHT horio shoichi 1995 CONCACHE value is the number of megabytes of cache data area. Because io request clash is most expensive, a larger delay tend to avoid that of request to write back by concache.exe and requests that come from DOS, the fore- ground. Also, the more writes accumulate in cache data area, the smaller the number of actual writes. On the other hand, there seems to be a tendency smaller cache data area favors smaller delay. If a[drives] argument is used, probably the larger delay will improve overall performance. Flags. Flags are specified after "+" or "-" to mean set or reset the flags. Default states of flags are all reset, irrespec- tive of options and arguments. h The flag h is to "hold" the cached data. If this flag is effective, no additional cache is made, while cached data are retrievable. This flag is useful to prevent a large copy of files from flushing useful cached data. l, u The flag l "lock"s the succeeding cached data. The locked cached data are not purged out of cache until worst case (where unused memory area exist to addition- ally cache) arises. To "unlock" the lock, use u flag. This flag starts unlock previously locked cache data. The +l starts locking referenced data, while -l stops locking further. The +u says start unlocking if data blocks touched are in locked state, while -u tells stop unlocking on further data reference. Locking and unlocking are done in units of 8kb. Locking is not a write protection. Locked data may get "dirty". They obey the usual cache refreshment policy. c,_a,w,_s The flags c, a, s, and w are alternate ways to define the cache refreshment policy for all drives. The c flag specifies all drives specified by c argument to use fully concurrent write back. The a flag specifies all drives specified by c or a argment to use non- concurrent write back. It allows concache.exe to syn- chronize with DOS. The w flag specifies all drives Concache 1.00 Last Update: 18 March 1995 6 CONCACHE COPYRIGHT horio shoichi 1995 CONCACHE specified by c, a, or w argument to use write back. The flag s specifies cache should not be done. These flags are mutually exclusive, and specifying one of these flags resets the other flags automatically. Since these flags are specified independently from drive arguments, the overall refreshment policy can be maintained keeping the drive's default policies. The flag set is combined with drive refreshment policy and the pessimistic value is used for the drive's pol- icy. Resetting these options lets concache.exe go to the default c refreshment policy, even if -c is written. These options are asymmetric in this sense. WHEN TO USE Each of arguments on command line can or must be specified at load time or after loaded. Following clarifies these conditions. Arguments missing in the tables below can be used either at load time or after loaded. Must be at load time Memory argument is the minimal must. The raw protected memory is specifiable only at load time. In addition, following options are only meaningful at load time. unknown_device_allowed, gang_interrupts, load_umb, buffer_size=, director_spaces=, iobuffers=, stackspace=. Used after loaded Option delete and h[c|dhsw], device arguments r[drives] and f[drives] are only meaningful after loaded. EXAMPLES Locking all executable's directory entries and stop locking concache /+l missing <--- nonexisting exe file Concache 1.00 Last Update: 18 March 1995 7 CONCACHE COPYRIGHT horio shoichi 1995 CONCACHE concache /-l Using 2megabytes of EMS and XMS each at startup concache /x2m /e2m Startup anyway. The exact memory size other than raw pro- tected memory will be given afterwards. concache /x0 SEE ALSO ccdisk.txt, cctame.txt, eqanda.txt, floppies.txt, intro.txt. FEATURES Concache.exe works only on physical block devices. No redirected nor character devices are considered. Concache 1.00 Last Update: 18 March 1995 8